import request from "../utils/request";

//注册发送验证码
export const sentCode = (params) =>
  request.get(`http://121.196.235.163:3000/captcha/sent?phone=${params.phone}`);
//验证验证码
export const verifyCode = (params) => {
  return request.get(
    `http://121.196.235.163:3000/captcha/verify?phone=${params.phone}&captcha=${params.captcha}`
  );
};
//注册
export const registerApi = (params) => {
  return request.post("app/register", params);
};
//手机登录先查找是否有该用户
export const findUserApi = (params) => request.post("app/finduser", params);
// 手机登录接口
export const getTokenApi = (params) => request.post("app/gettoken", params);

// 登录接口
export const userLogin = (params) => {
  return request.post("app/login", params);
};
//找回密码
export const changepassApi = (params) => request.post("app/changepass", params);
